<?php
$controllerID = \Yii::$app->controller->id;//当前控制器
$actionID = \Yii::$app->controller->action->id;//当前方法
$param_channel = isset($_GET['channel']) ? $_GET['channel'] : 0;
//活动管理
$cur_active = '';
if(in_array($controllerID, ['m-activity-show','m-activity-show-feel-reply', 'm-activity-show-feel', 'comments-relation', 'comments','full-cut'])) {
    $cur_active = 'active';
}
?>
<aside class="main-sidebar">

    <section class="sidebar">

        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle" alt="User Image"/>
            </div>
            <div class="pull-left info">
                <p><?= Yii::$app->user->identity['true_name'];?></p>

                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>

        <!-- search form -->
        <!--<form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search..."/>
              <span class="input-group-btn">
                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
            </div>
        </form>-->
        <!-- /.search form -->
		<!-- 静态 -->
		<ul class="sidebar-menu">
			<li>
				<a href="<?= Yii::$app->urlManager->createUrl(['site/index'])?>"><i class="fa fa-dashboard"></i>
					<span>控制面板</span>
				</a>
			</li>
			<!-- <li>
    			<a href="#"><i class="fa fa-cog"></i> <span>系统管理</span>
    					<i class="fa fa-angle-left pull-right"></i>
    			</a>
				<ul class="treeview-menu">
					<li><a
						href="javascript:;"><i
							class="fa fa-angle-right"></i> <span>用户管理</span></a></li>
					<li><a href="javascript:;"><i
							class="fa fa-angle-right"></i> <span>菜单管理</span></a></li>
					<li><a href="javascript:;"><i
							class="fa fa-angle-right"></i> <span>角色管理</span></a></li>
					<li><a href="javascript:;"><i
							class="fa fa-angle-right"></i> <span>路由管理</span></a></li>
					<li><a href="javascript:;"><i
							class="fa fa-angle-right"></i> <span>操作记录</span></a></li>
				</ul>
			</li> -->
			<li class="<?= in_array($controllerID, ['m-activity-show','m-activity-show-feel','m-activity-show-feel-reply']) ? 'active' : '';?>">
				<a href="#"><i class="fa fa-book"></i><span>活动管理</span> 
					<i class="fa fa-angle-left pull-right"></i>
				</a>
				<ul class="treeview-menu">
					<li class="<?= $controllerID == 'm-activity-show' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['m-activity-show/index'])?>"><i
							class="fa fa-angle-right"></i> <span>活动列表</span></a>
					</li>
					<li class="<?= $controllerID == 'm-activity-show-feel' && $actionID =='index' && $param_channel == 1 ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['m-activity-show-feel/index', 'channel'=>1])?>"><i
								class="fa fa-angle-right"></i> <span>回复审核</span></a>
					</li>
					<li class="<?= $controllerID == 'm-activity-show' && $actionID =='create' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['m-activity-show/create'])?>"><i
							class="fa fa-angle-right"></i> <span>添加活动</span></a>
					</li>
					<li class="<?= $controllerID == 'm-activity-show-feel' && $actionID =='index' && $param_channel == 2 ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['m-activity-show-feel/index', 'channel'=>2])?>"><i
								class="fa fa-angle-right"></i> <span>心得审核</span></a>
					</li>
					<li class="<?= $controllerID == 'm-activity-show-feel-reply' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['m-activity-show-feel-reply/index'])?>"><i
							class="fa fa-angle-right"></i> <span>评论管理</span></a>
					</li>
				</ul>
			</li>
            <li class="<?= in_array($controllerID, ['day-try','super-try','try-rec','logo-adv','try-adv']) ?  'active' : '';?>">
				<a href="#"><i class="fa fa-book"></i><span>首页管理</span> 
					<i class="fa fa-angle-left pull-right"></i>
				</a>
                                <ul class="treeview-menu">
					<li class="<?= $controllerID == 'day-try' && $actionID =='index'  ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['day-try/index'])?>"><i
								class="fa fa-angle-right"></i> <span>每日一试</span></a>
					</li>
					<li class="<?= $controllerID == 'super-try' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['super-try/index'])?>"><i
							class="fa fa-angle-right"></i> <span>超值试用</span></a>
					</li>
					<li class="<?= $controllerID == 'try-rec' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['try-rec/index'])?>"><i
							class="fa fa-angle-right"></i> <span>小试推荐</span></a>
					</li>
                                        <li class="<?= $controllerID == 'logo-adv' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['logo-adv/index'])?>"><i
							class="fa fa-angle-right"></i> <span>LOGO右侧广告</span></a>
					</li>
                                        <li class="<?= $controllerID == 'try-adv' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['try-adv/index'])?>"><i
							class="fa fa-angle-right"></i> <span>大试特试(先试后买、试用报告)</span></a>
					</li>
				</ul>
				
			</li>
			<li class="<?= in_array($controllerID, ['comments-relation','comments'])  ? 'active' : '';?>">
				<a href="#"><i class="fa fa-comments"></i><span>评论管理</span>
					<i class="fa fa-angle-left pull-right"></i>
				</a>
				<ul class="treeview-menu">
					<li class="<?= $controllerID == 'comments-relation' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['comments-relation/index'])?>"><i
							 class="fa fa-angle-right"></i> <span>评论列表</span></a>
					</li>
					<li class="<?= $controllerID == 'comments' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['comments/index'])?>"><i
							 class="fa fa-angle-right"></i> <span>刷新redis</span></a>
					</li>
				</ul>

			</li>
			<li class="<?= $controllerID == 'full-cut' ? 'active' : '';?>">
				<a href="#"><i class="fa fa-comments"></i><span>促销管理</span>
					<i class="fa fa-angle-left pull-right"></i>
				</a>
				<ul class="treeview-menu">
					<li class="<?= $controllerID == 'full-cut' && $actionID =='index' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['full-cut/index'])?>"><i
							 class="fa fa-angle-right"></i> <span>满减列表</span></a>
					</li>
					<li class="<?= $controllerID == 'full-cut' && $actionID =='create' ? 'active' : ''?>"><a href="<?= Yii::$app->urlManager->createUrl(['full-cut/create'])?>"><i
							 class="fa fa-angle-right"></i> <span>添加满减</span></a>
					</li>
				</ul>

			</li>
                        <li class="<?= $controllerID == 'help-center' ? 'active' : ''; ?>">
                            <a href="#">
                                <i class="fa fa-comments"></i><span>帮助中心</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li class="<?= $controllerID == 'help-center' && $actionID =='list' ? 'active' : ''?>">
                                    <a href="<?= Yii::$app->urlManager->createUrl(['help-center/list'])?>">
                                        <i class="fa fa-angle-right"></i> <span>帮助信息列表</span>
                                    </a>
                                </li>
                                <li class="<?= $controllerID == 'help-center' && $actionID =='add' ? 'active' : ''?>">
                                    <a href="<?= Yii::$app->urlManager->createUrl(['help-center/add'])?>">
                                        <i class="fa fa-angle-right"></i> <span>添加帮助信息</span>
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <!--加载导航栏目到使用导出的时候自动加上菜单 2016-05-19 feyeen -->
                        <li class="<?= $controllerID == 'statistic' ? 'active' : ''; ?>">
                            <!--<a href="#">
                                <i class="fa fa-comments"></i><span>统计管理</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li class="<?= $controllerID == 'statistic' && $actionID =='index' ? 'active' : ''?>">
                                    <a href="<?= Yii::$app->urlManager->createUrl(['statistic/index'])?>">
                                        <i class="fa fa-angle-right"></i> <span>今日统计</span>
                                    </a>
                                </li>
                            </ul>-->
                        </li>
		</ul>
		<!-- 动态权限菜单 -->
    </section>

</aside>

